package com.hz.sdka.commona.bean;

public class HZAdError {

    private String errorCode;
    private String errorMsg;
    protected String platformCode;
    protected String platformMSG;
    public HZAdError(String errorCode, String errorMsg,String platformCode, String platformMSG ) {
        this.errorCode = errorCode;
        this.errorMsg = errorMsg;
        this.platformCode=platformCode;
        this.platformMSG=platformMSG;
    }

    public String getErrorCode() {
        return errorCode;
    }

    public void setErrorCode(String errorCode) {
        this.errorCode = errorCode;
    }

    public String getErrorMsg() {
        return errorMsg;
    }

    public void setErrorMsg(String errorMsg) {
        this.errorMsg = errorMsg;
    }

    public String getPlatformCode() {
        return platformCode;
    }

    public void setPlatformCode(String platformCode) {
        this.platformCode = platformCode;
    }

    public String getPlatformMSG() {
        return platformMSG;
    }

    public void setPlatformMSG(String platformMSG) {
        this.platformMSG = platformMSG;
    }

    public String printStackTrace() {
        return "code:[ " + errorCode + " ]" +
                "desc:[ " + errorMsg + " ]" +
                "platformCode:[ " + platformCode + " ]" +
                "platformMSG:[ " + platformMSG + " ]";
    }

    /**
     * 广告对象已失效
     */
    public static HZAdError AD_OBJECT_IS_INVALID = new HZAdError("10001", "ad object is invalid","","");

    /**
     * 广告加载超时
     */
    public static HZAdError AD_LOAD_TIMEOUT = new HZAdError("10002", "ad load timeout","","");

    /**
     * 上下文无效
     */
    public static HZAdError ACTIVITY_IS_INVALID = new HZAdError("10002", "activity is invalid","","");

    /**
     * 广告未加载
     */
    public static HZAdError AD_NOT_LOADED = new HZAdError("10003", "ad not loaded","","");

    /**
     * 广告列表为空
     */
    public static HZAdError AD_LIST_IS_EMPTY = new HZAdError("10004", "ad list is null or empty","","");
}
